export function setStorage(key,value,time=0){
	if(time>0){
		value.expiration=(Date.now()/1000).toFixed()*1+time*1;
	}
	uni.setStorageSync(key,value);
}
export function getStorage(key){
	const nowDate=(Date.now()/1000).toFixed()*1;
	const data=uni.getStorageSync(key)?uni.getStorageSync(key):false;
	if(data.expiration){
		if(nowDate>data.expiration){
			removeStorage(key);
			return false;
		}
	}
	//delete data.expiration;
	return data;
}
export function removeStorage(key){
	uni.removeStorageSync(key)
}
export function clearStorage(){
	uni.clearStorageSync();
}